GoogleRedesignedRDFDataSource.prototype.serializeToString = function () {var outputStream = {data: "", close: function () {}, flush: function () {}, write: function (buffer, count) {this.data += buffer;return count;}, writeFrom: function (stream, count) {}, isNonBlocking: false};this.serializeToStream(outputStream);return outputStream.data;};
GoogleRedesignedRDFDataSource.prototype.serializeToStream = function (outputStream) {var ser = Components.classes['@mozilla.org/rdf/xml-serializer;1'].createInstance(Components.interfaces.nsIRDFXMLSerializer);ser.init(this.datasource);ser.QueryInterface(Components.interfaces.nsIRDFXMLSource).Serialize(outputStream);};
GoogleRedesignedRDFDataSource.prototype.makeemptyds = function (uri) {this.datasource = Components.classes['@mozilla.org/rdf/datasource;1?name=in-memory-datasource'].createInstance(Components.interfaces.nsIRDFDataSource);};
GoogleRedesignedRDFDataSource.prototype.getAllResources = function () {if (this.datasource == null) {return null;}return new GoogleRedesignedRDFEnumerator(this.datasource.GetAllResources(), this.datasource);};
GoogleRedesignedRDFDataSource.prototype.getRawDataSource = function () {if (this.datasource == null) {this.makeemptyds();}return this.datasource;};
GoogleRedesignedRDFDataSource.prototype.getNode = function (uri) {if (this.datasource == null) {this.makeemptyds();}var node = new GoogleRedesignedRDFNode(uri, this);return node;};
GoogleRedesignedRDFDataSource.prototype.getAnonymousNode = function () {if (this.datasource == null) {this.makeemptyds();}var anon = RDFService.GetAnonymousResource();var node = new GoogleRedesignedRDFNode;node.Init(anon, this.datasource);return node;};
GoogleRedesignedRDFDataSource.prototype.getLiteral = function (uri) {if (this.datasource == null) {this.makeemptyds();}return new GoogleRedesignedRDFLiteral(uri, this);};
GoogleRedesignedRDFNode.prototype.getProperties = function () {return new GoogleRedesignedRDFEnumerator(this.datasource.ArcLabelsOut(this.source), this.datasource);};
GoogleRedesignedRDFNode.prototype.getInProperties = function () {return new GoogleRedesignedRDFEnumerator(this.datasource.ArcLabelsIn(this.source), this.datasource);};
GoogleRedesignedRDFNode.prototype.propertyExists = function (prop) {prop = this.makeres(prop);return this.datasource.hasArcOut(this.source, prop);};
GoogleRedesignedRDFNode.prototype.inPropertyExists = function (prop) {prop = this.makeres(prop);return this.datasource.hasArcIn(this.source, prop);};
GoogleRedesignedRDFNode.prototype.getTarget = function (prop) {prop = this.makeres(prop);return this.rlify(this.datasource.GetTarget(this.source, prop, true));};
GoogleRedesignedRDFNode.prototype.getSource = function (prop) {prop = this.makeres(prop);var src = this.datasource.GetSource(prop, this.source, true);if (src == null) {return null;}var res = new GoogleRedesignedRDFNode;res.Init(src, this.datasource);return res;};
GoogleRedesignedRDFNode.prototype.getTargets = function (prop) {prop = this.makeres(prop);return new GoogleRedesignedRDFEnumerator(this.datasource.GetTargets(this.source, prop, true), this.datasource);};
GoogleRedesignedRDFNode.prototype.getSources = function (prop) {prop = this.makeres(prop);return new GoogleRedesignedRDFEnumerator(this.datasource.GetSources(prop, this.source, true), this.datasource);};
GoogleRedesignedRDFNode.prototype.makeBag = function () {this.container = RDFContainerUtilsService.MakeBag(this.datasource, this.source);};
GoogleRedesignedRDFNode.prototype.makeSeq = function () {this.container = RDFContainerUtilsService.MakeSeq(this.datasource, this.source);};
GoogleRedesignedRDFNode.prototype.makeAlt = function () {this.container = RDFContainerUtilsService.MakeAlt(this.datasource, this.source);};
GoogleRedesignedRDFNode.prototype.isBag = function () {return RDFContainerUtilsService.IsBag(this.datasource, this.source);};
GoogleRedesignedRDFNode.prototype.isSeq = function () {return RDFContainerUtilsService.IsSeq(this.datasource, this.source);};
GoogleRedesignedRDFNode.prototype.isAlt = function () {return RDFContainerUtilsService.IsAlt(this.datasource, this.source);};
GoogleRedesignedRDFNode.prototype.isContainer = function () {return RDFContainerUtilsService.IsContainer(this.datasource, this.source);};
GoogleRedesignedRDFNode.prototype.getChildCount = function () {if (this.makecontain()) {return this.container.GetCount();}return -1;};
GoogleRedesignedRDFNode.prototype.getChildren = function () {if (this.makecontain()) {return new GoogleRedesignedRDFEnumerator(this.container.GetElements(), this.datasource);} else {return null;}};
GoogleRedesignedRDFLiteral.prototype.getInProperties = function (prop) {return new GoogleRedesignedRDFEnumerator(this.datasource.ArcLabelsIn(this.source), this.datasource);};
GoogleRedesignedRDFLiteral.prototype.inPropertyExists = function (prop) {prop = this.makeres(prop);return this.datasource.hasArcIn(this.source, prop);};
GoogleRedesignedRDFLiteral.prototype.getSource = function (prop) {prop = this.makeres(prop);var src = this.datasource.GetSource(prop, this.source, true);if (src == null) {return null;}var res = new GoogleRedesignedRDFNode;res.Init(src, this.datasource);return res;};
GoogleRedesignedRDFLiteral.prototype.getSources = function (prop) {prop = this.makeres(prop);return new GoogleRedesignedRDFEnumerator(this.datasource.GetSources(prop, this.source, true), this.datasource);};